package com.study.manage.dal;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.study.manage.domain.UserOrganiza;


public interface UserOrganizaRepository extends PagingAndSortingRepository<UserOrganiza, Long> {

    UserOrganiza findByRegUserId(Long userId);

    UserOrganiza findByUserId(Long userId);

    @Query("select t from UserOrganiza t where t.email=:email and t.state!=1")
    UserOrganiza findByEmail(@Param("email") String email);

}
